package org.shangda.wechat.pet.service;

import org.shangda.wechat.pet.model.Member;
import org.shangda.wechat.pet.web.vo.MemberSimpleInfo;
import org.shangda.wechat.pet.web.vo.MiniappMemberVo;
import com.power.common.model.CommonResult;

public interface MemberService {
    /**
     * 根据小程序Openid获取会员
     * @param openid
     * @return
     */
    Member findByOpenId(String openid);

    /**
     * 保存更新会员信息
     * @param miniappMemberVo
     * @return
     */
    CommonResult saveMember(MiniappMemberVo miniappMemberVo);


    /**
     * 获取会员信息
     * @param memberSimpleInfo
     * @return
     */
    MiniappMemberVo getMemberInfo(MemberSimpleInfo memberSimpleInfo);

    /**
     * 通过授权个人信息更新会员信息
     * @param miniappMemberVo
     */
    void updateMemberByAuthorize(MiniappMemberVo miniappMemberVo);

    /**
     * 注销会员
     */
    void memberCancellation(Integer memberId);

    /**
     * 获取会员手机号
     * @param code
     * @return
     */
    String getUserPhoneNumber(String code);
}
